/***************************************************
Class: Graphics
Includes: stdafx.h
Editors: Gindi
Existing Issues: None
Description: Initializes and sets the display device.
***************************************************/
#pragma once

#include "stdafx.h"

class Graphics {
public:
	Graphics();
	~Graphics() { Release(); }
	bool Initialize(HWND hWnd);
	void Release();
	BOOL Reset();
	void setAntiAlising(bool aa);

	LPDIRECT3D9			getD3D()			{ return m_pD3D9; }
	LPDIRECT3DDEVICE9	getDevice()			{ return m_pDevice; }
	D3DDISPLAYMODE*		getDisplayMode()	{ return &m_displayMode; }
	bool getAntiAlising()					{ return m_antialising; }
	DWORD getVertexProcessing()				{ return m_vertexProcessing; }

private:
	bool BuildPresentParameters();

	HWND					m_hWnd;
	HINSTANCE				m_hInstance;
	LPDIRECT3D9				m_pD3D9;
	LPDIRECT3DDEVICE9		m_pDevice;
	D3DCAPS9				m_caps;
	D3DPRESENT_PARAMETERS	m_pp;
	D3DDISPLAYMODE			m_displayMode;
	bool					m_antialising;
	DWORD					m_vertexProcessing;
	//IDirect3DSurface9*		m_surface;
};